package com.springboot.study.tests.designpattern.flyweight;

import java.awt.*;

/**
 * @Author: guodong
 * @Date: 2021/5/8 14:33
 * @Version: 1.0
 * @Description:
 */
public class WhiteChess implements Chess{

    //内部状态，共享
    private final Color color = Color.white;

    private final String sharp = "圆形";

    public Color getColor() {
        return color;
    }

    @Override
    public void draw(int x, int y) {
        System.out.println(String.format("%s%s棋子置于（%d，%d）处", sharp, color.getAlpha(), x, y));
    }

}
